@echo off
set user=zhangyu
set host=123.60.114.150
set port=2222
set srcDir=/mnt/data/zhangyu/Program/rk3568/rk3568/out/rk3568/arkui/ace_engine
set dstDir=.\

@REM pull the dynamic library from the server
set ftpFile=sftp.txt
>%ftpFile% (
    echo get %srcDir%/libace.z.so %dstDir%
    echo get %srcDir%/libace_compatible.z.so %dstDir%
    echo bye
)
sftp -b %ftpFile% -oPort=%port% %user%@%host%
del %ftpFile%

@REM push the dynamic library to the rk3568
hdc shell mount -o rw,remount /

hdc file send ./libace.z.so /system/lib/platformsdk
hdc file send ./libace_compatible.z.so /system/lib/platformsdk

hdc shell reboot
echo "The machine is rebooting now..."